package servlet;

import java.io.IOException;
import java.util.Vector;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import DAO.ScoreDao;
import DTO.Score;

public class AllScoreServlet extends HttpServlet {
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		//调用DAO查找所有用户信息
    	ScoreDao sd=new ScoreDao();
    	 Vector<Score> v =sd.fineAllScore();
    	HttpSession s=req.getSession();
    	s.setAttribute("allscore", v);
    	//返回到student.jsp页面并显示查找的所有用户信息
    	 resp.sendRedirect(req.getContextPath()+"/admin/allscore.jsp");
	}
}
